<?php /* Smarty version 2.6.26, created on 2010-04-29 10:18:36
         compiled from admin_center/addNews.html.php */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="<?php echo $this->_tpl_vars['base_url']; ?>
result/sky_editor/fckeditor.js"></script>
<script src="<?php echo $this->_tpl_vars['sky_img']; ?>
js/jquery.js"></script>
<script language="javascript">
$(function(){
	$('#button').click(function(){
		if($('#newstitle').val() ==''){
			alert('新闻标题不能为空');
			$('#newstitle').focus();
			return false;
		}else if($('#newstype').val() =='' || $('#newstype').val() ==0){
			alert('请选择新闻的类型');
			$('#newstype').focus();
			return false;					 
		}
	});

});
//function checkform(){
//	if(document.news.newstitle.value ==''){
//		alert('新闻标题不能为空');
//		document.news.newstitle.focus();
//		return false;
//	}
//	if(document.news.newstype.value ==0){
//		alert('请选择新闻的类型');
//		document.news.newstype.focus();
//		return false;
//	}
//	if(document.news.content.value ==''){
//		alert('请输入新闻内容');
//		document.news.content.focus();
//		return false;
//	}
//}
</script>
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	font-size:12px;
}
.STYLE1 {font-size: 12px}
.STYLE4 {
	font-size: 12px;
	color: #1F4A65;
	font-weight: bold;
}

a:link {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;

}
a:visited {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}
a:hover {
	font-size: 12px;
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}
.STYLE7 {font-size: 12}

-->
</style>

<script>
var  highlightcolor='#eafcd5';
//此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
var  clickcolor='#51b2f6';
function  changeto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=highlightcolor;
}
}

function  changeback(){
if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

function  clickto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}
</script>
<link href="<?php echo $this->_tpl_vars['sky_img']; ?>
css/tab.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c0de98" onmouseover="changeto()"  onmouseout="changeback()">
          <tr>
            <td height="25" colspan="8" background="<?php echo $this->_tpl_vars['sky_img']; ?>
images/admin_center/tab_14.gif" class="STYLE1">&nbsp;&nbsp;<strong>添加新闻</strong></td>
          </tr>
          <form name="news" method="post" action="save_news">
          <input type="hidden" name="admins" value="<?php echo $this->_tpl_vars['admins']; ?>
">
          <tr>
            <td width="60" height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="201" height="18" bgcolor="#FFFFFF" class="titles">新闻标题：</td>
            <td height="18" colspan="4" bgcolor="#FFFFFF"><input name="newstitle" type="text" id="newstitle" size="40" /></td>
            <td width="95" height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="48" height="18" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF" class="titles">新闻类型：</td>
            <td height="18" colspan="4" bgcolor="#FFFFFF">
            <select name="newstype" id="newstype">
              <option value="0">请选择新闻类型</option>
              <?php $_from = $this->_tpl_vars['style']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['val']):
?>
              <option value="<?php echo $this->_tpl_vars['val']['style_id']; ?>
"><?php echo $this->_tpl_vars['val']['style_name']; ?>
</option>
              <?php endforeach; endif; unset($_from); ?>
            </select></td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF" class="titles" style="vertical-align:top;">编辑内容：</td>
            <td height="18" colspan="4" bgcolor="#FFFFFF">
            <textarea name="content" id="content"></textarea>
			<script type="text/javascript">
				var oFCKeditor = new FCKeditor("content"); 
				oFCKeditor.BasePath = "<?php echo $this->_tpl_vars['base_url']; ?>
result/sky_editor/";  
				oFCKeditor.Height = 500; 
				oFCKeditor.ToolbarSet = "Default";  
				oFCKeditor.ReplaceTextarea();
            </script>
            </td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr style="display:none">
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF" class="titles">发布时间：</td>
            <td height="18" colspan="4" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF" class="titles">截止日期：</td>
            <td height="18" colspan="4" bgcolor="#FFFFFF" class="titles" style="text-align:left;"><input type="text" name="endtime" id="endtime" />
            (时间格式为 2010-01-01)</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF" class="titles">查看权限：</td>
            <td width="86" height="18" bgcolor="#FFFFFF" class="titles" style=" text-align:left;"><input type="radio" name="member" id="publices" value="1" />公开
            <input type="radio" name="member" id="members" value="2" />会员</td>
            <td width="87" height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="132" height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="398" height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF" class="STYLE2">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF"></td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          <tr>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF" class="STYLE2">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF" style="text-align:center;">
                <input type="submit" name="button" id="button" value="提交" />&nbsp;
                <input type="reset" name="button2" id="button2" value="重置" />
            </td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
          </form>
          <tr>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF" class="STYLE2">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
            <td height="18" bgcolor="#FFFFFF">&nbsp;</td>
          </tr>
        </table>
</body>
</html>